package com.platform.controller.backend;

import com.platform.common.ServerResponse;
import com.platform.service.ISynDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/synDataController/")
public class SynDataController {

    @Autowired
    private ISynDataService iSynDataService;

    @RequestMapping("synPsac0001.do")
    @ResponseBody
    public ServerResponse<String> synPsac0001(){
        return iSynDataService.synPsac0001();
    }

    @RequestMapping("synPsac0002.do")
    @ResponseBody
    public ServerResponse<String> synPsac0002(){
        return iSynDataService.synPsac0002();
    }

    @RequestMapping("synPsac0009.do")
    @ResponseBody
    public ServerResponse<String> synPsac0009(){
        return iSynDataService.synPsac0009();
    }

    @RequestMapping("synUserInfo.do")
    @ResponseBody
    public ServerResponse<String> synUserInfo(){
        return iSynDataService.synUserInfo();
    }

    @RequestMapping("synRole.do")
    @ResponseBody
    public ServerResponse<String> synRole(){
        return iSynDataService.synRole();
    }

    @RequestMapping("synUserRole.do")
    @ResponseBody
    public ServerResponse<String> synUserRole(){
        return iSynDataService.synUserRole();
    }

    /**
     * 同步专家信息
     * @return
     */
    @RequestMapping("synPsad0001.do")
    @ResponseBody
    public ServerResponse<String> synPsad0001(){
        return iSynDataService.synPsad0001();
    }


    /**
     * 同步招标人信息
     * @return
     */
    @RequestMapping("synPsaa0001.do")
    @ResponseBody
    public ServerResponse<String> synPsaa0001(){
        return iSynDataService.synPsaa0001();
    }


    /**
     * 同步枚举信息
     * @param dictCode
     * @return
     */
    @RequestMapping("synPsad0002.do")
    @ResponseBody
    public ServerResponse<String> synPsad0002(@RequestParam(value = "dictCode") String dictCode){
        return iSynDataService.synPsad0002(dictCode);
    }

}
